<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>杨梅色彩</title>
    <script src="__INDEX__/js/mui.min.js"></script>
	<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
	<link rel="stylesheet" href="__INDEX__/css/style.css" />
	<link rel="stylesheet" href="__INDEX__/css/mall.css" />	
	<script type="text/javascript" src="__INDEX__/dist/jquery.min.js" ></script>
</head>
<body>
	<div class="mui-content">
	    {include file="public/member" /}
	     <div class="glj_bt1"><span class="mui-icon iconfont icon-dingdan4"></span><em style="padding-left: 20px;">预定列表</em></div>
	   <ul class="record_list2">
	    	<li class="clearfix">
	    		<div class="pj">预订人</div>
	    		<div class="pj">预定场地</div>
	    		<div class="pj">预定费用</div>
	    		<div class="pj">状态</div>
	    		<div class="pj1">时间</div>
    		</li>
	    </ul>
		<p id="no_record" style="color:#D6AA50;text-align: center;display: none;">数据已加载完毕</p>
	  
	</div>
	<input type="hidden" id="page" value="1" />
		{include file="public/bottom" /}
</body>
</html>
	{include file="public/footer" /}
		
<script src="__PUBLIC__/static/js/mui.min.js"></script>
<script>
	
	get_data();
	function get_data(){
			$.ajax({
			type:"post",
			data:{
				page:$("#page").val()
			},
			url:"{:url('index/member/yuding')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					for(var i=0;i<list.length;i++){
						var log=list[i];
						if(log.state==1){
							var status='成功';
						}else{
							var status='失败';
						}
						html+='<li class="clearfix">'+
				    		'<div class="pj">'+log.re_name+'</div>'+
				    		'<div class="pj">'+log.home_name+'</div>'+
				    		'<div class="pj">'+log.balance+'</div>'+
				    		'<div class="pj">'+status+'</div>'+
				    		'<div class="pj1">'+log.add_time+'</div>'+
			    			'</li>';
					}
				}else{
					$("#no_record").show();
				}
				$(".record_list2").append(html);
				
			}
		});
	}
	$(window).scroll(function(){
		var scrollTop = $(window).scrollTop();       //滚动条高度
		var bodyheight = $(document).height();         //文档的高度
		var windowheight = window.innerHeight;	//$(window).height();              //当前窗体的高度
		if((bodyheight - windowheight - scrollTop) == 0){
			$.ajax({
			type:"post",
			data:{
				page:parseFloat($("#page").val())+1
			},
			url:"{:url('index/member/yuding')}",
			success:function(data){	
				var list=data.list;
				var html="";
				if(list&&list.length>0){
					$("#page").val(parseFloat($("#page").val())+1);
					for(var i=0;i<list.length;i++){
						var log=list[i];
						if(log.state==1){
							var status='成功';
						}else{
							var status='失败';
						}
						html+='<li class="clearfix">'+
				    		'<div class="pj">'+log.re_name+'</div>'+
				    		'<div class="pj">'+log.home_name+'</div>'+
				    		'<div class="pj">'+log.balance+'</div>'+
				    		'<div class="pj">'+status+'</div>'+
				    		'<div class="pj1">'+log.add_time+'</div>'+
			    			'</li>';
					}
				}else{
					$("#no_record").show();
				}
				$(".record_list2").append(html);
				
			}
		});
		
		}				
	})
	
</script>
